﻿using System;
using System.Collections.Generic;
using INSE6260.OnlineBanking.Infrastructure;
using INSE6260.OnlineBanking.Infrastructure.Domain;
using INSE6260.OnlineBanking.Model.Payee;
using INSE6260.OnlineBanking.Model.Clients;

namespace INSE6260.OnlineBanking.Model.Accounts
{
    public class AccountType
    {
        public int Id { get; set; }
        public string Desc { get; set; }
    }
    public class Account : EntityBase, IAggregateRoot
    {
        public int Id { get; set; }
        public int ClientId { get; set; }
        public string AccountNo { get; set; }
        public decimal Balance { get; set; }
        public decimal AvailableBalance { get; set; }
        public DateTime OpenDate { get; set; }
        public int WPD { get; set; }
        public int WPT { get; set; }
        public bool Status { get; set; }

        public virtual Client Client { get; set; }
        public virtual ICollection<ClientCard.ClientCard> ClientCards { get; set; }
        public virtual ICollection<PayeeName> PayeeNames { get; set; }
        public virtual ICollection<Transaction.Transaction> Transactions { get; set; }
        public virtual ICollection<Transaction.Transaction> Transactions1 { get; set; }

        public virtual String AccountTypeDiscription
        {
            get
            {
                return "Account";
            }
        }
        public virtual String AcountDescAndNo
        {
            get
            {
                return AccountTypeDiscription + "-" + AccountNo;
            }
        }
    }
}
